package daoImpl;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

import dao.LunboDao;
import entlty.Lunbo;
import utils.BaseDao;

public class LunboDaoImpl extends BaseDao implements LunboDao{

	@Override
	public List<Lunbo> getLunbo() {
		List<Lunbo> list=new ArrayList<Lunbo>();
		String sql="select * from lunbo";
		ResultSet rs=super.exeQuery(sql);
		try {
			while(rs.next()){
				Lunbo l=new Lunbo(rs.getInt(1),rs.getString(2));
				list.add(l);
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		return list;
	}
	
	
}
